]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
system: Remove rogue separator in lock screen
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 12 Aug 2013 17:08:53 +0000 (13:08 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 13 Aug 2013 10:50:24 +0000 (06:50 -0400)
Hide the actions box when none are showing.

https://bugzilla.gnome.org/show_bug.cgi?id=705845

js/ui/status/system.js

index 74eb002664702847d13970af9434cf2f8f47e666..8e889dcc497be3a9170e38581091f0e03fd5e500 100644 (file)
@@ -113,11 +113,21 @@ const Indicator = new Lang.Class({
         this._sessionUpdated();
     },
 
+    _updateActionsVisibility: function() {
+        let visible = (this._settingsAction.visible ||
+                       this._orientationLockAction.visible ||
+                       this._lockScreenAction.visible ||
+                       this._powerOffAction.visible);
+
+        this._actionsItem.actor.visible = visible;
+    },
+
     _sessionUpdated: function() {
         this._updateLockScreen();
         this._updatePowerOff();
         this._updateMultiUser();
         this._settingsAction.visible = Main.sessionMode.allowSettings;
+        this._updateActionsVisibility();
     },
 
     _updateMultiUser: function() {
@@ -183,12 +193,15 @@ const Indicator = new Lang.Class({
         let locked = this._orientationSettings.get_boolean('orientation-lock');
         let icon = this._orientationLockAction.child;
         icon.icon_name = locked ? 'rotation-locked-symbolic' : 'rotation-allowed-symbolic';
+
+        this._updateActionsVisibility();
     },
 
     _updateLockScreen: function() {
         let showLock = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
         let allowLockScreen = !this._lockdownSettings.get_boolean(DISABLE_LOCK_SCREEN_KEY);
         this._lockScreenAction.visible = showLock && allowLockScreen && LoginManager.canLock();
+        this._updateActionsVisibility();
     },
 
     _updateHaveShutdown: function() {
@@ -203,6 +216,7 @@ const Indicator = new Lang.Class({
 
     _updatePowerOff: function() {
         this._powerOffAction.visible = this._haveShutdown && !Main.sessionMode.isLocked;
+        this._updateActionsVisibility();
     },
 
     _createActionButton: function(iconName, accessibleName) {
@@ -269,6 +283,7 @@ const Indicator = new Lang.Class({
                                                  can_focus: false });
         item.addActor(hbox, { expand: true });
 
+        this._actionsItem = item;
         this.menu.addMenuItem(item);
     },